Is \d equal to [0-9] in sed?

Posted by user3872279 on Super User See other posts from Super User or by user3872279
Published on 2014-08-20T09:16:29Z Indexed on 2014/08/20 10:24 UTC
Read the original article Hit count: 124

Filed under:
|
|
7
00:00:30,008 --> 00:00:30,066
by line
8
00:00:31,038 --> 00:00:34,050
or later in the nineteen seventies it was usually a
9
00:00:34,005 --> 00:00:38,634^M
video consul but the council was not capable of displaying arbitrate graphics
10

The above lines is in a file named 2.txt. I wanna the lines which doesn't start with number. In practice, sed -i '/^[0-9]+/d' 2.txt works good. However, sed -i '/^\d+/d' 2.txt doesnot. The \d shouldn't be equal to [0-9] in regex?

© Super User or respective owner

Related posts about linux

Related posts about bash